#!/bin/bash
# 243
rm -rf /etc/init.d/tomcat7*
ls /etc/init.d/ | grep "tomcat"
 chkconfig --del tomcat7-2g-8282

./single-installed-byport.sh 1 8181

rm -rf /home/tomcat/*

cd /home/tomcat/tomcat-8181/webapps
cd /home/tomcat/tomcat-8181/webapps;wget http://192.168.1.111:9200/webapps/report.war
cd /home/tomcat/tomcat-8282/webapps;wget http://192.168.1.111:9200/webapps/report.war

mkdir -p /ltdata/logs/8181;mkdir -p /ltdata/logs/8282;mkdir -p /ltdata/logs/8383
service tomcat7-8181 start;service tomcat7-8282 start
service tomcat7-8181 stop;service tomcat7-8282 stop
service tomcat7-8181 start;service tomcat7-8282 start;service tomcat7-8383 start
service tomcat7-8181 stop;service tomcat7-8282 stop;service tomcat7-8383 stop

vi /home/tomcat/tomcat-8181/webapps/report/WEB-INF/classes/log4j.xml
vi /home/tomcat/tomcat-8282/webapps/report/WEB-INF/classes/log4j.xml
vi /home/tomcat/tomcat-8383/webapps/report/WEB-INF/classes/log4j.xml

-- apache
cd /home/install/apache
./balance-installed.sh 8080 haha
cd /home/apache

http://192.168.1.112:8181/admin/jk
http://192.168.1.113:8080/admin/jk
http://192.168.1.111:8080/admin/jk
192.168.1.111

rm -rf  /home/apache/htdocs/resources
mkdir -p  /home/apache/htdocs/report
cp -rf /home/tomcat/tomcat-8383/webapps/report/resources /home/apache/htdocs/report

cp -rf tomcat-8181/webapps/* tomcat-8383/webapps/

vi /home/tomcat/tomcat-8181/conf/server.xml
service httpd stop
service tomcat7 stop
service httpd start

vi /home/apache/conf/httpd.conf
vi /home/apache/conf/workers.properties

service tomcat7 start;service tomcat7-8282 start;service tomcat7-8383 start

mkdir -p /home/backup/report-20160815;cp -rf /home/tomcat/tomcat-8181/webapps/* /home/backup/report-20160815

service tomcat7-8282 stop
rm -rf /home/tomcat/tomcat-8282/webapps/*
cp -rf /home/tomcat/tomcat-8181/webapps/* /home/tomcat/tomcat-8282/webapps/
service tomcat7-8282 start

service tomcat7-8383 stop
rm -rf /home/tomcat/tomcat-8383/webapps/*
cp -rf /home/tomcat/tomcat-8181/webapps/* /home/tomcat/tomcat-8383/webapps/
service tomcat7-8383 start
